Requests and results topic

Requests and results

Each medium has its own typed request that carries the prompt and the fields that medium supports. Every capability answers with the same GenerationResult: the raw bytes, their MIME type, the media kind, and metadata about the run. One result shape covers all six mediums, so calling code reads the output the same way everywhere.

Classes

GenerationMetadata Requests and results
Normalized metadata describing a generation result.
GenerationProgress Requests and results
A progress update emitted while a generation job runs.
GenerationRequest Requests and results
The common base for every typed generation request.
GenerationResult Requests and results
The normalized output of any generation: bytes plus describing metadata.
ImageRequest Requests and results
A request to generate a still image.
MusicRequest Requests and results
A request to generate a musical track.
SoundEffectRequest Requests and results
A request to generate a short non-musical sound effect.
SpeechRequest Requests and results
A request to synthesize speech from text.
TextImage Requests and results
An image attached to the current user turn of a text request.
TextMessage Requests and results
One turn in a multi-turn text conversation.
TextRequest Requests and results
A request for a text completion.
VideoRequest Requests and results
A request to generate a video clip.

Enums

GenerationStage Requests and results
The coarse lifecycle stage of a generation job.
MediaKind Requests and results
The six mediums this package normalizes behind uniform capability contracts.
TextRole Requests and results
Who authored a TextMessage in a conversation.